﻿<UserControl x:Class="CoolCode.Controls.XHeader"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     xmlns:cc="clr-namespace:CoolCode.Controls">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/CoolCode;Component/Themes/generic.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>
    <Grid Cursor="Hand" Margin="0,0,0,0"  >

        <StackPanel  Orientation="Horizontal">
            <Border CornerRadius="3" Height="23" BorderBrush="#8db2e3"   HorizontalAlignment="Left" >
                <Border.Background>
                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0" Opacity="0.2">
                        <GradientStop Color="#ffffff" Offset="0"/>
                        <GradientStop Color="#deecfd" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>

                <StackPanel  Orientation="Horizontal">
                    <!--<StackPanel.OpacityMask >
                        <LinearGradientBrush StartPoint="0.5,0.0" EndPoint="0.5,1.0">
                            <GradientStop Offset="0.0" Color="#00000000" />
                            <GradientStop Offset="1.0" Color="#FF000000" />
                        </LinearGradientBrush>
                    </StackPanel.OpacityMask>-->
                    <Grid  >
                        <Border   Margin="1" CornerRadius="2" >
                            <!--OpacityMask="{TemplateBinding OpacityMask}"-->
                            <!--<Border.BorderBrush>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF494990" Offset="0"/>
                                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                    <GradientStop Color="#FF718597" Offset="0.375"/>
                                    <GradientStop Color="#FF617584" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.BorderBrush>-->
                            <TextBlock x:Name="TextBlockHeader" Padding="2,1,0,1" Grid.Column="0" HorizontalAlignment="Left">Header</TextBlock>

                            <!--<ContentPresenter x:Name="ContentPresenterElement"  Margin="2"
                                              Content="{TemplateBinding Header}" 
                                              ContentTemplate="{TemplateBinding HeaderTemplate}">
                        </ContentPresenter>-->
                        </Border>
                        <Grid x:Name="MaskGrid"  Opacity="0.2">
                            <!--<Grid.OpacityMask >
                                <LinearGradientBrush StartPoint="0.5,0.0" EndPoint="0.5,1.0">
                                    <GradientStop Offset="0.0" Color="#00000000" />
                                    <GradientStop Offset="1.0" Color="#FF000000" />
                                </LinearGradientBrush>
                            </Grid.OpacityMask>-->
                        </Grid>
                    </Grid>

                    <cc:ImageButton x:Name="close" Width="13" Height="12" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="7"
                                                       NormalImage="/CoolCode.Controls;component/Images/ico_close.png"
                                                       HoverImage="/CoolCode.Controls;component/Images/ico_close_hover.png"
                                                       ClickImage="/CoolCode.Controls;component/Images/ico_close_click.png"  />

                </StackPanel>
            </Border>
        </StackPanel >
        <!--<Grid x:Name="MaskGrid" Background="Black" Opacity="0.2"></Grid>-->
    </Grid>
</UserControl>
